Skip to content

Conversation

Huxpro
Copy link
Member

@Huxpro Huxpro commented Nov 7, 2023

Summary of changes:
See #6417.

Alternatively, we can follow the current Next.js doc and use "Client Component modules". However, considering the possible existence of React Client Action, it seems like this notion does not necessarily bound to "Component".

How do we call this:

// requestUsername.js
'use server';

export default async function requestUsername(formData) {
  const username = formData.get('username');
  if (canRequest(username)) {
    // ...
    return 'successful';
  }
  return 'failed';
}
  • Server module?
  • Server Action module?
  • Server Module??

Copy link

github-actions bot commented Nov 7, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@gaearon gaearon merged commit c5a2e15 into main Nov 7, 2023
@rickhanlonii rickhanlonii deleted the xuan/capClientModule branch April 29, 2024 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants